<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>超市订单管理系统</title>
    <link rel="stylesheet" type="text/css" href="/css/style.css">
    <!--[if lt IE 9]>
    <script src="/js/html5.js"></script>
    <![endif]-->
    <script src="/js/jquery.js"></script>
    <script src="/js/jquery.mCustomScrollbar.concat.min.js"></script>
</head>
<body>
<div th:replace="head::header"></div>
<div class="rt_content">
    <div class="page_title">
        <h2 class="fl">角色配置</h2>
    </div>
    <div class="providerAdd">
                        <div class="form-group">
                            <label>角色名称：</label>
                            <span th:text="${role.roleName}"></span>
                        </div>
                        <div class="form-group">
                            <label>功能列表：</label>
                        </div>
                        <form id="proForm" name="proForm" method="post" th:action="@{/user/add_role_perm(role_id=${role.id})}"
                              enctype="multipart/form-data">
                        <div style="width: 800px;height: 100px ;margin-top:5px">
                            <th:block th:each="p:${perms}">
                                <label th:for="${p.name}" th:text="${p.name}" style="margin-left: 5px"></label>
                                <th:block th:if="${#lists.contains(perms_id,p.id)}")>
                                <input th:id="${p.id}" name="roleArray" type="checkbox" th:name="permList" th:value="${p.id}" checked style="width: 10px;height: 10px;margin-left: 10px;margin-bottom: 5px">
                                </th:block>
                                <th:block th:if="${not #lists.contains(perms_id,p.id)}")>
                                    <input th:id="${p.id}" name="roleArray" type="checkbox"  th:name="permList" th:value="${p.id}" style="width: 10px;height: 10px;margin-left: 10px;margin-bottom: 5px">
                                </th:block>
                                </th:block>

                        </div>
                            <div class="providerAddBtn">
                                <button type="submit" class="btn btn-primary" ><a class="btn btn-default" >保存</a></button>
                                <button><a type="button" class="btn btn-default" data-dismiss="modal" th:href="@{/user/find_all_role}">返回</a></button>
                            </div>
                    </form>
                </div>
</div>
</body>
</html>